
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
AddCSLuaFile( "admins.lua" )

include( 'shared.lua' )
include( 'admins.lua' )

DeriveGamemode( "sandbox" )

// Serverside only stuff goes here

/*---------------------------------------------------------
   Name: gamemode:PlayerLoadout( )
   Desc: Give the player the default spawning weapons/ammo
---------------------------------------------------------*/
function GM:PlayerInitialSpawn( pl )
	RunConsoleCommand( "show_welcome" )
	RunConsoleCommand( "t_menu" )
end

function GM:PlayerLoadout( pl )

	pl:StripWeapons()
	if pl:Team() == 1 then
		if pl:IsAdmin() then
			pl:Give( "morp_chair_admin" )
		end
		pl:Give( "weapon_physcannon" )
		
	
	elseif pl:Team() == 2 then
		if pl:IsAdmin() then
			pl:Give( "morp_chair_admin" )
		end
		pl:Give( "weapon_physgun" )
		pl:Give( "gmod_tool" )
		pl:Give( "weapon_physcannon" )
	
	end

end

function team_1( pl )
	pl:SetTeam( 1 )
		pl:Spawn()
end

function team_2( pl )
	pl:SetTeam( 2 )
		pl:Spawn()
end

concommand.Add( "team_1", team_1 )
concommand.Add( "team_2", team_2 )